using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Intervention_ConclusionMap : EntityTypeConfiguration<Intervention_Conclusion>
    {
        public Intervention_ConclusionMap()
        {
            // Primary Key
            this.HasKey(t => t.IC_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.IC_PLE_Residual_stenosis)
                .HasMaxLength(50);

            this.Property(t => t.IC_PLE_Residual_stenosis_detail)
                .HasMaxLength(50);

            this.Property(t => t.IC_PLE_Min_diameter)
                .HasMaxLength(50);

            this.Property(t => t.IC_PLE_Min_diameter_detail)
                .HasMaxLength(50);

            this.Property(t => t.IC_PLE_TIMI_Blood_flow)
                .HasMaxLength(50);

            this.Property(t => t.IC_PLE_TIMI_Blood_flow_detail)
                .HasMaxLength(50);

            this.Property(t => t.IC_Blood_pressure_SBP)
                .HasMaxLength(50);

            this.Property(t => t.IC_Blood_pressure_DBP)
                .HasMaxLength(50);

            this.Property(t => t.IC_Postoperative_Conclusion)
                .HasMaxLength(50);

            this.Property(t => t.IC_Conclusion_failure_detail)
                .HasMaxLength(100);

            this.Property(t => t.IC_Conclusion_failure_Other)
                .HasMaxLength(50);

            this.Property(t => t.IC_IsConclusion)
                .IsFixedLength()
                .HasMaxLength(4);

            // Table & Column Mappings
            this.ToTable("Intervention_Conclusion");
            this.Property(t => t.IC_ID).HasColumnName("IC_ID");
            this.Property(t => t.TTL_ID).HasColumnName("TTL_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.IC_PLE_Residual_stenosis).HasColumnName("IC_PLE_Residual_stenosis");
            this.Property(t => t.IC_PLE_Residual_stenosis_detail).HasColumnName("IC_PLE_Residual_stenosis_detail");
            this.Property(t => t.IC_PLE_Min_diameter).HasColumnName("IC_PLE_Min_diameter");
            this.Property(t => t.IC_PLE_Min_diameter_detail).HasColumnName("IC_PLE_Min_diameter_detail");
            this.Property(t => t.IC_PLE_TIMI_Blood_flow).HasColumnName("IC_PLE_TIMI_Blood_flow");
            this.Property(t => t.IC_PLE_TIMI_Blood_flow_detail).HasColumnName("IC_PLE_TIMI_Blood_flow_detail");
            this.Property(t => t.IC_Blood_pressure_SBP).HasColumnName("IC_Blood_pressure_SBP");
            this.Property(t => t.IC_Blood_pressure_DBP).HasColumnName("IC_Blood_pressure_DBP");
            this.Property(t => t.IC_Postoperative_Conclusion).HasColumnName("IC_Postoperative_Conclusion");
            this.Property(t => t.IC_Conclusion_failure_detail).HasColumnName("IC_Conclusion_failure_detail");
            this.Property(t => t.IC_Conclusion_failure_Other).HasColumnName("IC_Conclusion_failure_Other");
            this.Property(t => t.IC_IsConclusion).HasColumnName("IC_IsConclusion");
        }
    }
}
